package org.springblade.modules.admin.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.admin.dto.feishu.FeiShuFieldsDTO;
import org.springblade.modules.admin.dto.plan.PlanContentExcelSearchDTO;
import org.springblade.modules.admin.entity.UserSignDetail;
import org.springblade.modules.admin.vo.UserSignDetailPageVo;
import org.springblade.modules.admin.vo.feishu.LarkElevatorDailyAttendanceStaticVO;
import org.springblade.modules.admin.vo.feishu.LarkUserSignDetailVO;

import java.util.Date;
import java.util.List;

public interface UserSignDetailMapper extends BaseMapper<UserSignDetail> {


	@InterceptorIgnore(tenantLine = "on")
    List<UserSignDetailPageVo> listUserSignDetail(@Param("startTime") String startTime, @Param("endTime") String endTime,
												  @Param("signType") Integer signType, @Param("sql") String sql, IPage<UserSignDetailPageVo> page, @Param("tenantId") String tenantId, @Param("userName") String userName);

	/**
	 * 获取考勤数据
	 * @param planContentExcelSearchDTO 查询条件
	 * @return 数据集
	 */
	List<UserSignDetail> getList(@Param("planContentExcelSearchDTO") PlanContentExcelSearchDTO planContentExcelSearchDTO);

	/**
	 * 获取当天考勤
	 * @param userId
	 * @return
	 */
	UserSignDetail getCurDateSign(Long userId);

	/**
	 * 获取飞书考勤数据
	 * @param tenantId 	租户ID
	 * @param startTime 开始时间
	 * @param endTime 结束时间
	 * @param userId 用户ID
	 * @return 飞书考勤数据
	 */
	List<LarkUserSignDetailVO> getLarkSignDetailByCondition(String tenantId, Date startTime, Date endTime, Long userId);

    List<LarkElevatorDailyAttendanceStaticVO> getLarkElevatorDailyAttendanceStatic();

	List<LarkElevatorDailyAttendanceStaticVO> getLarkElevatorDailyAttendanceStaticFull();
}
